package dt.day01;

public class Car extends MotoVehicle {

    private String type;

    public Car() {
        super();
    }

    public Car(String brand,String type) {
        super(brand);
        this.type = type;
    }

    public Car(String no, String brand,String type) {
        super(no, brand);
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public double calMoney(int days) {
        double rent=0;
        if(this.type.equals("1")){
            //550i
            rent=500*days;
        }else if(this.type.equals("2")){
            //商务舱GL8
            rent=600*days;
        }else if(this.type.equals("3")){
            //林荫大道
            rent=300*days;
        }
        return rent;
    }
}
